package com.sinozo.controller;

import com.sinozo.IEmailService;
import com.sinozo.domain.ResponseDTO;
import com.sinozo.email.EmailSendDTO;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 邮箱
 *
 * @author zhehen.lu
 * @date 2025/11/6 00:16
 */
@RestController
@RequestMapping("/v1/email")
@Log
public class EmailController {

    @Autowired
    IEmailService emailService;

    @PostMapping("send")
    public ResponseDTO<Void> sendEmail(@RequestBody EmailSendDTO emailSendDTO) {
        emailService.sendEmail(emailSendDTO);
        return ResponseDTO.success();
    }
}
